package com.zhuss.controller.opus;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.opus.invit.DetailInvitBo;
import com.zhuss.bean.bo.opus.invit.wechat.ListInvitBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.ReadService;
import com.zhuss.exception.WpsException;
import com.zhuss.opus.invit.InvitReadServiceWechat;


/**
 * invit查询 controller
 * @Author zhushanshuo
   @Date 2020-02-04 22:58
 *
 */
  
 
@RestController
@RequestMapping("/invit")
public class InvitReadController extends BaseController {
	
	@Autowired
	@Qualifier("invitReadServiceWechat")
	private InvitReadServiceWechat invitReadServiceWechat;
	
	@Autowired
	@Qualifier("invitReadService")
	private ReadService<Object, Object> invitReadService;
	
	
	/**
	 * 详情
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/detail")
    public Object detail(@RequestBody DetailInvitBo bo) throws WpsException {
		
		Object result = invitReadService.detail(bo);
		return result;
    }
	
	/**
	 * wechat
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
    @RequestMapping("/listInvit")
    public Object listInvit(@RequestBody ListInvitBo bo) throws WpsException {
		
		Object result = invitReadServiceWechat.listInvit(bo);
		return result;
    }
	
	
	/**
	 * wechat
	 * 评论树
	 * 列表
	 * @param bo
	 * @return
	 * @throws WpsException
	 */
	@ResponseBody
	@RequestMapping("/listTopicTree")
	public Object listTopicTree(@RequestBody DetailInvitBo bo) throws WpsException {
		
		Object result = invitReadServiceWechat.listTopicTree(bo);
		return result;
	}
	
	
}
